package cn.juque.jdfsystem.vo.configinfo;

import cn.juque.jdfsystem.vo.BaseVO;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author JUQUE
 * @version 1.0.0
 * <ul>
 *  <li>simple-generator</li>
 *  <li>配置信息</li>
 * </ul>
 * @date 2023-01-08 14:38:52
 **/
@Data
public class ConfigInfoAddVO extends BaseVO {

    /**
     * 配置名称
     */
    @NotEmpty(message = "配置名称不能为空")
    @Size(message = "配置名称不能超过{max}个字符", max = 100)
    private String configName;

    /**
     * 域
     */
    @NotNull(message = "作用域必选")
    private Integer scope;

    /**
     * 配置编码
     */
    @NotEmpty(message = "配置编码不能为空")
    @Size(message = "配置编码不能超过{max}个字符", max = 100)
    private String configCode;

    /**
     * 配置值
     */
    @Size(message = "配置值不能超过{max}个字符", max = 500)
    private String configValue;

    /**
     * 是否允许同步
     */
    @NotNull(message = "是否允许同步不能为空")
    @Range(min = 0, max = 9, message = "是否允许同步必须在{min}-{max}之间")
    private Integer syncFlag;

    /**
     * 有效标识
     */
    @NotNull(message = "有效标识不能为空")
    @Range(min = 0, max = 9, message = "有效标识必须在{min}-{max}之间")
    private Integer validFlag;

    /**
     * 备注
     */
    @Size(message = "备注不能超过{max}个字符", max = 500)
    private String remark;

}
